24000 REM ============================
24001 REM Config Entry Counter
24002 REM
24003 REM INPUT - CURDIR$ dir of blog
24003 REM OUTPUT - CFGCNT # of config
24004 REM                 entries
24005 REM ===========================
24010 ON ERROR GOTO 24040
24015 CFGCNT = 0
24020 OPEN CURDIR$+"\config.ini" FOR INPUT AS #9
24030 GOTO 24050
24040 GOTO 24098
24050 WHILE(NOT EOF(9))
24060    LINE INPUT #9, CFGLINE$
24070    IF LEN(CFGLINE$) = 0 OR MID$(CFGLINE$,1,1) = "#" THEN GOTO 24090
24080    CFGCNT = CFGCNT + 1
24090 WEND
24095 CLOSE #9
24098 ON ERROR GOTO 0
24099 RETURN
24100 REM =============================
24101 REM Config file parser
24102 REM
24103 REM INPUT - LBL$ List of labels
24104 REM         REPL$ List of values
24105 REM         ILBL # of labels
24106 REM              already set
24107 REM         CURDIR$ dir of blog
24108 REM =============================
24110 CFGIDX = ILBL
24120 OPEN CURDIR$+"\config.ini" FOR INPUT AS #9
24130 WHILE(NOT EOF(9))
24140    LINE INPUT #9, CFGLINE$
24150    IF LEN(CFGLINE$) = 0 OR MID$(CFGLINE$,1,1) = "#" THEN GOTO 24210
24160    CFGIDX = CFGIDX + 1
24170    EQSIGN = 1:WHILE(MID$(CFGLINE$,EQSIGN,1) <> "="):EQSIGN = EQSIGN + 1:WEND
24180    LBL$[CFGIDX] = MID$(CFGLINE$, 1, EQSIGN-1)
24190    REPL$[CFGIDX] = MID$(CFGLINE$, EQSIGN+1, LEN(CFGLINE$)-EQSIGN)
24210 WEND
24220 CLOSE #9
24230 RETURN

